import { apiApp } from '@/services/api';

const fetch = require('dva').fetch;

export const qiankun = apiApp({}).then(res => {
  const apps = res.data.app;
  return {
    apps,
    fetch: url => fetch(url), // url: 子应用的静态资源
  };
});

export const dva = {
  config: {
    onError (err) {
      err.preventDefault();
      console.error(err.message);
    },
  },
};
